package com.ruoyi.procurementmanagement.domain;

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 入库单对象 erp_warehouse_entry
 *
 * @author ruoyi
 * @date 2025-03-14
 */
public class ErpWarehouseEntry extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 入库单编号 */
    @Excel(name = "入库单编号")
    private String sn;

    /** 入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date entryTime;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Long supplierId;

    /** 供应商编号 */
    @Excel(name = "供应商编号")
    private String supplierSn;

    /** 部门id */
    @Excel(name = "部门id")
    private Long deptId;

    /** 仓库id */
    @Excel(name = "仓库id")
    private Long warehouseId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String deptName;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 合同id */
    @Excel(name = "合同id")
    private Long contractId;

    /** 经手人id */
    @Excel(name = "经手人id")
    private Long handledById;

    /** 经手人名称 */
    @Excel(name = "经手人名称")
    private String handledByName;

    /** 车牌号 */
    @Excel(name = "车牌号")
    private String plateNumber;

    /** 采购计划id */
    @Excel(name = "采购计划id")
    private Long purchasePlanId;

    /** 送货单号 */
    @Excel(name = "送货单号")
    private String deliveryNumber;

    /** 合同附件 */
    @Excel(name = "合同附件")
    private String contractAttachment;

    /** 审核人 */
    @Excel(name = "审核人")
    private String auditBy;

    /** 入库单状态 */
    @Excel(name = "入库单状态")
    private String status;

    /** 审核备注 */
    @Excel(name = "审核备注")
    private String auditRemark;

    /** 采购计划编号 */
    @Excel(name = "采购计划编号")
    private String procurementPlanSn;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractSn;

    /** 是否已生成供应商结算单 */
    @Excel(name = "是否已生成供应商结算单")
    private Integer supplierSettlementFlag;

    /** 供应商结算单id */
    @Excel(name = "供应商结算单id")
    private Long supplierSettlementId;

    /** 创建者 */
    @Excel(name = "创建者")
    private String creator;

    /** 更新者 */
    @Excel(name = "更新者")
    private String updater;

    // 新增：入库产品列表
    private List<ErpWarehouseEntryProduct> entryProducts;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setSn(String sn)
    {
        this.sn = sn;
    }

    public String getSn()
    {
        return sn;
    }
    public void setEntryTime(Date entryTime)
    {
        this.entryTime = entryTime;
    }

    public Date getEntryTime()
    {
        return entryTime;
    }
    public void setSupplierId(Long supplierId)
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId()
    {
        return supplierId;
    }
    public void setSupplierSn(String supplierSn)
    {
        this.supplierSn = supplierSn;
    }

    public String getSupplierSn()
    {
        return supplierSn;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }
    public void setWarehouseId(Long warehouseId)
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId()
    {
        return warehouseId;
    }
    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    public String getDeptName()
    {
        return deptName;
    }
    public void setSupplierName(String supplierName)
    {
        this.supplierName = supplierName;
    }

    public String getSupplierName()
    {
        return supplierName;
    }
    public void setWarehouseName(String warehouseName)
    {
        this.warehouseName = warehouseName;
    }

    public String getWarehouseName()
    {
        return warehouseName;
    }
    public void setContractId(Long contractId)
    {
        this.contractId = contractId;
    }

    public Long getContractId()
    {
        return contractId;
    }
    public void setHandledById(Long handledById)
    {
        this.handledById = handledById;
    }

    public Long getHandledById()
    {
        return handledById;
    }
    public void setHandledByName(String handledByName)
    {
        this.handledByName = handledByName;
    }

    public String getHandledByName()
    {
        return handledByName;
    }
    public void setPlateNumber(String plateNumber)
    {
        this.plateNumber = plateNumber;
    }

    public String getPlateNumber()
    {
        return plateNumber;
    }
    public void setPurchasePlanId(Long purchasePlanId)
    {
        this.purchasePlanId = purchasePlanId;
    }

    public Long getPurchasePlanId()
    {
        return purchasePlanId;
    }
    public void setDeliveryNumber(String deliveryNumber)
    {
        this.deliveryNumber = deliveryNumber;
    }

    public String getDeliveryNumber()
    {
        return deliveryNumber;
    }
    public void setContractAttachment(String contractAttachment)
    {
        this.contractAttachment = contractAttachment;
    }

    public String getContractAttachment()
    {
        return contractAttachment;
    }
    public void setAuditBy(String auditBy)
    {
        this.auditBy = auditBy;
    }

    public String getAuditBy()
    {
        return auditBy;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setAuditRemark(String auditRemark)
    {
        this.auditRemark = auditRemark;
    }

    public String getAuditRemark()
    {
        return auditRemark;
    }
    public void setProcurementPlanSn(String procurementPlanSn)
    {
        this.procurementPlanSn = procurementPlanSn;
    }

    public String getProcurementPlanSn()
    {
        return procurementPlanSn;
    }
    public void setContractSn(String contractSn)
    {
        this.contractSn = contractSn;
    }

    public String getContractSn()
    {
        return contractSn;
    }
    public void setSupplierSettlementFlag(Integer supplierSettlementFlag)
    {
        this.supplierSettlementFlag = supplierSettlementFlag;
    }

    public Integer getSupplierSettlementFlag()
    {
        return supplierSettlementFlag;
    }
    public void setSupplierSettlementId(Long supplierSettlementId)
    {
        this.supplierSettlementId = supplierSettlementId;
    }

    public Long getSupplierSettlementId()
    {
        return supplierSettlementId;
    }
    public void setCreator(String creator)
    {
        this.creator = creator;
    }

    public String getCreator()
    {
        return creator;
    }
    public void setUpdater(String updater)
    {
        this.updater = updater;
    }

    public String getUpdater()
    {
        return updater;
    }

    public List<ErpWarehouseEntryProduct> getEntryProducts() {
        return entryProducts;
    }

    public void setEntryProducts(List<ErpWarehouseEntryProduct> entryProducts) {
        this.entryProducts = entryProducts;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sn", getSn())
                .append("entryTime", getEntryTime())
                .append("supplierId", getSupplierId())
                .append("supplierSn", getSupplierSn())
                .append("deptId", getDeptId())
                .append("warehouseId", getWarehouseId())
                .append("deptName", getDeptName())
                .append("supplierName", getSupplierName())
                .append("warehouseName", getWarehouseName())
                .append("contractId", getContractId())
                .append("handledById", getHandledById())
                .append("handledByName", getHandledByName())
                .append("plateNumber", getPlateNumber())
                .append("purchasePlanId", getPurchasePlanId())
                .append("deliveryNumber", getDeliveryNumber())
                .append("contractAttachment", getContractAttachment())
                .append("auditBy", getAuditBy())
                .append("status", getStatus())
                .append("auditRemark", getAuditRemark())
                .append("procurementPlanSn", getProcurementPlanSn())
                .append("contractSn", getContractSn())
                .append("supplierSettlementFlag", getSupplierSettlementFlag())
                .append("supplierSettlementId", getSupplierSettlementId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("creator", getCreator())
                .append("updater", getUpdater())
                .append("entryProducts", getEntryProducts()) // 新增
                .toString();
    }
}
